/*
 * @ProjectName: 编程学习
 * @Copyright:   2019 HangZhou Ashe Dev, Ltd. All Right Reserved.
 * @address:     https://yiyuery.github.io/
 * @date:        2020/1/6 9:57 下午
 * @description: 本内容仅限于编程技术学习使用，转发请注明出处.
 */
package com.capsule.spring.boot.hello.config;

import com.capsule.spring.boot.hello.annotation.ConditionOnSystem;
import com.capsule.spring.boot.hello.beans.Future;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>
 *
 * </p>
 *
 * @author Ashe
 * @version V1.0.0
 * @date 2020/1/6 9:57 下午
 * @modificationHistory=========================逻辑或功能性重大变更记录
 * @modify By: {修改人}  2020/1/6
 * @modify reason: {方法名}:{原因}
 * ...
 */
@Configuration
@Slf4j
public class HelloFutureConfig {

    @Bean
    public Future future(){
        log.info("future bean init");
        return new Future();
    }

    @ConditionOnSystem(system = "windows")
    @Bean
    public Future future2(){
        log.info("future bean init for windows");
        return new Future();
    }

    @ConditionOnSystem(system = "mac")
    @Bean
    public Future future3(){
        log.info("future bean init for mac");
        return new Future();
    }
}
